home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / frexp.z / frexp
Encoding:
Text File  |  1998-10-20  |  14.8 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ffffrrrreeeexxxxpppp((((3333CCCC))))                                                            ffffrrrreeeexxxxpppp((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ffff_rrrr_eeee_xxxx_pppp, _llll_dddd_eeee_xxxx_pppp, _llll_oooo_gggg_bbbb, _iiii_llll_oooo_gggg_bbbb, _mmmm_oooo_dddd_ffff, _mmmm_oooo_dddd_ffff_ffff, _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr, _ssss_cccc_aaaa_llll_bbbb, _ffff_rrrr_eeee_xxxx_pppp_llll, _llll_dddd_eeee_xxxx_pppp_llll,
  10.      _llll_oooo_gggg_bbbb_llll, _mmmm_oooo_dddd_ffff_llll, _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll, _ssss_cccc_aaaa_llll_bbbb_llll - manipulate parts of floating-point
  11.      numbers (libc routines)
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_mmmm_aaaa_tttt_hhhh_...._hhhh_>>>>
  15.  
  16.      _dddd_oooo_uuuu_bbbb_llll_eeee _ffff_rrrr_eeee_xxxx_pppp _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _****_eeee_pppp_tttt_rrrr_))))_;;;;
  17.  
  18.      _dddd_oooo_uuuu_bbbb_llll_eeee _llll_dddd_eeee_xxxx_pppp _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _eeee_xxxx_pppp_))))_;;;;
  19.  
  20.      _dddd_oooo_uuuu_bbbb_llll_eeee _llll_oooo_gggg_bbbb _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_))))_;;;;
  21.  
  22.      _iiii_nnnn_tttt _iiii_llll_oooo_gggg_bbbb _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_))))_;;;;
  23.  
  24.      _dddd_oooo_uuuu_bbbb_llll_eeee _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_1111_,,,, _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_2222_))))_;;;;
  25.  
  26.      _dddd_oooo_uuuu_bbbb_llll_eeee _ssss_cccc_aaaa_llll_bbbb _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _dddd_oooo_uuuu_bbbb_llll_eeee _eeee_xxxx_pppp_))))_;;;;
  27.  
  28.      _dddd_oooo_uuuu_bbbb_llll_eeee _mmmm_oooo_dddd_ffff _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _dddd_oooo_uuuu_bbbb_llll_eeee _****_iiii_pppp_tttt_rrrr_))))_;;;;
  29.  
  30.      _ffff_llll_oooo_aaaa_tttt _mmmm_oooo_dddd_ffff_ffff _((((_ffff_llll_oooo_aaaa_tttt _vvvv_aaaa_llll_uuuu_eeee_,,,, _ffff_llll_oooo_aaaa_tttt _****_iiii_pppp_tttt_rrrr_))))_;;;;
  31.  
  32.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _ffff_rrrr_eeee_xxxx_pppp_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _****_eeee_pppp_tttt_rrrr_))))_;;;;
  33.  
  34.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _llll_dddd_eeee_xxxx_pppp_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _eeee_xxxx_pppp_))))_;;;;
  35.  
  36.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _llll_oooo_gggg_bbbb_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_))))_;;;;
  37.  
  38.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_1111_,,,, _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_2222_))))_;;;;
  39.  
  40.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _ssss_cccc_aaaa_llll_bbbb_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _eeee_xxxx_pppp_))))_;;;;
  41.  
  42.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _mmmm_oooo_dddd_ffff_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _****_iiii_pppp_tttt_rrrr_))))_;;;;
  43.  
  44. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  45.      (Note that the long double routines are only valid for the MIPSpro
  46.      compilers.)  Long double functions have been renamed to be compliant with
  47.      the ANSI-C standard, however to be backward compatible, they may still be
  48.      called with the double precision function name prefixed with a q.
  49.  
  50.      Every non-zero number can be written uniquely as _x*2**_n, where the
  51.      ``mantissa'' (fraction) _x is in the range 0.5 _< |_x| < 1.0, and the
  52.      ``exponent'' _n is an integer.  _ffff_rrrr_eeee_xxxx_pppp returns the mantissa of a double
  53.      _v_a_l_u_e, and stores the exponent indirectly in the location pointed to by
  54.      _e_p_t_r.  If _v_a_l_u_e is zero, both results returned by _ffff_rrrr_eeee_xxxx_pppp are zero.
  55.  
  56.      _ffff_rrrr_eeee_xxxx_pppp_llll returns the mantissa of a long double _v_a_l_u_e, and stores the
  57.      exponent indirectly in the location pointed to by _e_p_t_r.  If _v_a_l_u_e is
  58.      zero, both results returned by _ffff_rrrr_eeee_xxxx_pppp_llll are zero.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffrrrreeeexxxxpppp((((3333CCCC))))                                                            ffffrrrreeeexxxxpppp((((3333CCCC))))
  71.  
  72.  
  73.  
  74.      _llll_dddd_eeee_xxxx_pppp and _ssss_cccc_aaaa_llll_bbbb return the quantity _v_a_l_u_e*2**_e_x_p.  The only difference
  75.      between the two is that _ssss_cccc_aaaa_llll_bbbb of a signaling NaN will result in the
  76.      invalid operation exception being raised.  Users should note that routine
  77.      scalb in libm43 with prototype
  78.  
  79.      _dddd_oooo_uuuu_bbbb_llll_eeee _ssss_cccc_aaaa_llll_bbbb _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _eeee_xxxx_pppp_))))
  80.  
  81.      conflicts with the above definition of scalb.  If it is necessary to call
  82.      the libc version of scalb in this situation, the strong name _scalb
  83.      should be used.
  84.  
  85.      _llll_dddd_eeee_xxxx_pppp_llll and _ssss_cccc_aaaa_llll_bbbb_llll return the quantity _v_a_l_u_e*2**_e_x_p.  The only difference
  86.      between the two is that _ssss_cccc_aaaa_llll_bbbb_llll of a signaling NaN will result in the
  87.      invalid operation exception being raised.
  88.  
  89.      _llll_oooo_gggg_bbbb returns the unbiased exponent of its floating-point argument as a
  90.      double-precision floating-point value.
  91.  
  92.      _iiii_llll_oooo_gggg_bbbb returns the unbiased exponent of its floating-point argument as an
  93.      integer value.  The call _iiii_llll_oooo_gggg_bbbb_((((_xxxx_)))) is equivalent to _((((_iiii_nnnn_tttt_))))_llll_oooo_gggg_bbbb_((((_xxxx_)))).
  94.  
  95.      _llll_oooo_gggg_bbbb_llll returns the unbiased exponent of its floating-point argument as a
  96.      long double-precision floating-point value.
  97.  
  98.      _mmmm_oooo_dddd_ffff , _mmmm_oooo_dddd_ffff_ffff (single-precision version) and _mmmm_oooo_dddd_ffff_llll (long double-precision
  99.      version) return the signed fractional part of _v_a_l_u_e and store the
  100.      integral part indirectly in the location pointed to by _i_p_t_r.
  101.  
  102.      _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr returns the next representable double-precision floating-point
  103.      value following _v_a_l_u_e_1 in the direction of _v_a_l_u_e_2.  Thus, if _v_a_l_u_e_2 is
  104.      less than _v_a_l_u_e_1, _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr returns the largest representable floating-
  105.      point number less than _v_a_l_u_e_1.
  106.  
  107.      _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll returns the next representable long double-precision
  108.      floating-point value following _v_a_l_u_e_1 in the direction of _v_a_l_u_e_2.
  109.  
  110. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  111.      _cccc_cccc(1), _iiii_nnnn_tttt_rrrr_oooo(3M).
  112.  
  113. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  114.      If _llll_dddd_eeee_xxxx_pppp or _llll_dddd_eeee_xxxx_pppp_llll would cause overflow, _++++_____HHHH_UUUU_GGGG_EEEE______VVVV_AAAA_LLLL (defined in _mmmm_aaaa_tttt_hhhh_...._hhhh) is
  115.      returned (according to the sign of _v_a_l_u_e), and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.
  116.      If _llll_dddd_eeee_xxxx_pppp or _llll_dddd_eeee_xxxx_pppp_llll would cause underflow, zero is returned and _eeee_rrrr_rrrr_nnnn_oooo is
  117.      set to _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.  If the input _v_a_l_u_e to _llll_dddd_eeee_xxxx_pppp or _llll_dddd_eeee_xxxx_pppp_llll is NaN, the default
  118.      quiet NaN is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_DDDD_OOOO_MMMM.  If the input _v_a_l_u_e to
  119.      _llll_dddd_eeee_xxxx_pppp or _llll_dddd_eeee_xxxx_pppp_llll is Infinity, Infinity is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to
  120.      _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.  The same error conditions apply to _ssss_cccc_aaaa_llll_bbbb and _ssss_cccc_aaaa_llll_bbbb_llll except that
  121.      a signaling NaN as input will result in the raising of the invalid
  122.      operation exception.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffrrrreeeexxxxpppp((((3333CCCC))))                                                            ffffrrrreeeexxxxpppp((((3333CCCC))))
  137.  
  138.  
  139.  
  140.      _llll_oooo_gggg_bbbb and _llll_oooo_gggg_bbbb_llll of NaN returns that NaN, _llll_oooo_gggg_bbbb and _llll_oooo_gggg_bbbb_llll of infinity return
  141.      positive infinity, and _llll_oooo_gggg_bbbb and _llll_oooo_gggg_bbbb_llll of zero return negative infinity
  142.      and result in the raising of the divide by zero exception.  In each of
  143.      these conditions _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_DDDD_OOOO_MMMM.
  144.  
  145.      _iiii_llll_oooo_gggg_bbbb of NaN or zero returns _I_N_T__M_I_N, _iiii_llll_oooo_gggg_bbbb of +infinity or -infinity
  146.      returns _I_N_T__M_A_X.  In each of these conditions _eeee_rrrr_rrrr_nnnn_oooo is _n_o_t set.
  147.  
  148.      If input _v_a_l_u_e_1 to _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr or _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll is positive or negative
  149.      infinity, that input is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_DDDD_OOOO_MMMM.  The overflow
  150.      and inexact exceptions are signalled when input _v_a_l_u_e_1 is finite, but
  151.      _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_((((_v_a_l_u_e_1_,,,, _v_a_l_u_e_2_)))) or _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll_((((_v_a_l_u_e_1_,,,, _v_a_l_u_e_2_)))) is not. The
  152.      underflow and inexact exceptions are signalled when _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_((((_v_a_l_u_e_1_,,,,
  153.      _v_a_l_u_e_2_)))) lies strictly between +_2**-1022 or _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll_((((_v_a_l_u_e_1_,,,, _v_a_l_u_e_2_))))
  154.      lies strictly between +_2**-916.  In these cases _eeee_rrrr_rrrr_nnnn_oooo is also set to
  155.      _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.